import { View } from "../../mvc/core/View";
import { LayerManager } from "../manager/LayerManager";
import { ObjCreate } from "./common/ObjCreate";
import { EffectManager } from "../manager/EffectManager";
import { FilterConst } from "../../component/gconst/FilterConst";
import { GLoadedButton } from "../../../com/mui/controls/GLoadedButton";
type int = number;
//class HintBtnBase
    
    export  class HintBtnBase extends View
    {
        constructor(arg1: string, arg2: int=1)
        {
            super();
            this._style = arg1;
            this._shineType = arg2;
            this.layer = LayerManager.rightTopUILayer;
            this.initUI();
            return;
        }

        protected initUI(): void
        {
            this._iconBtn = ObjCreate.createGLoadedButton(this._style, 0, 0, 60, 50, this);
            this.addChild(this._iconBtn);
            this._iconBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onIconBtnClick);
            return;
        }

        protected onIconBtnClick(arg1: Object /* flash.events.MouseEvent */): void
        {
            if (this._shineType == HintBtnBase.SHINE_CLICK) 
            {
                EffectManager.glowFilterUnReg(this);
            }
            return;
        }

        public /* override */ show(arg1: int=0, arg2: int=0): void
        {
            super.show(arg1, arg2);
            if (this._shineType != HintBtnBase.SHINE_NO) 
            {
                EffectManager.glowFilterReg(this, [FilterConst.yellowGlowFilter]);
            }
            return;
        }

        public /* override */ hide(): void
        {
            super.hide();
            if (this._shineType != HintBtnBase.SHINE_NO) 
            {
                EffectManager.glowFilterUnReg(this);
            }
            return;
        }

        public static /* const */SHINE_ALWAY: int=1;

        public static /* const */SHINE_CLICK: int=2;

        public static /* const */SHINE_NO: int=3;

        protected /* var */_iconBtn: GLoadedButton;

        protected /* var */_style: string;

        /* internal */ /* var */_shineType: int;
    }
